import request from '@/util/request.js'

/**
 * @description 发布/更新零活
 * @param {Object} data
 */
export function saveWork(data){
	return request({
		url:'/saveWork',
		method:'POST',
		data
	})
}
/**
 * @description 获取零工过程状态列表
 */
export function getProcessStatusBasis(){
	return request({
		url:'/getProcessStatusBasis',
		method:'GET'
	})
}

/**
 * @description 获取我发布的零工列表
 * @param {Object} data
 */
export function sendWorkList(data){
	return request({
		url:'/sendWorkList',
		method:'GET',
		data
	})
}

/**
 * @description 获取我收藏的零工列表
 * @param {Object} data
 */
export function collectWorkList(data){
	return request({
		url:'/collectWorkList',
		method:'GET',
		data
	})
}
/**
 * @description 获取我接的活零工列表
 * @param {Object} data
 */
export function robWorkList(data){
	return request({
		url:'/robWorkList',
		method:'GET',
		data
	})
}
/**
 * @description 获取零工列表排序依据
 * @param {Object} data
 */
export function getOrderBasis(data){
	return request({
		url:'/getOrderBasis',
		method:'GET',
		data
	})
}
/**
 * @description 获取公开的零工列表 
 * @param {Object} data
 */
export function getWorkPublicList(data){
	return request({
		url:'/getWorkPublicList',
		method:'GET',
		data
	})
}
/**
 * @description 根据limit获取首页工种
 * @param {Object} data
 */
export function getIndexMenuWorkType(data){
	return request({
		url:'/getIndexMenuWorkType',
		method:'GET',
		data
	})
}
/**
 * @description 获取公开零工详情
 * @param {Object} id
 */
export function publicWorkDetail(id){
	return request({
		url:'/publicWorkDetail/'+id,
		method:'GET',
	})
}
/**
 * @description 抢活
 * @param {Object} data
 */
export function robWork(data){
	return request({
		url:'/robWork',
		method:'POST',
		data
	})
}
/**
 * @description 收藏/取消收藏 零活
 * @param {Object} data
 */
export function collectWork(data){
	return request({
		url:'/collectWork',
		method:'POST',
		data
	})
}
/**
 * @description 获取我发布的零工详情
 * @param {Object} id
 */
export function sendWorkDetail(id){
	return request({
		url:'/sendWorkDetail/'+id,
		method:'GET',
	})
}
/**
 * @description 取消
 * @param {Object} data
 */
export function cancelWork(data){
	return request({
		url:'/cancelWork',
		method:'POST',
		data
	})
}

/**
 * @description 获取我发的活的抢活人列表
 * @param {Object} data
 */
export function applyList(data){
	return request({
		url:'/applyList',
		method:'GET',
		data
	})
}
